from django.shortcuts import render
from django.conf.urls import url, include
from django.contrib.auth.models import User
from rest_framework import routers, serializers, viewsets
from rest_framework import permissions

from ..models.ServicioOp import ServicioOp


class ServicioOpSerializer(serializers.ModelSerializer):

    class Meta:
        model = ServicioOp
        #fields = ('url', 'abrev', 'descr')


class ServicioOpViewSet(viewsets.ModelViewSet):  # API REST
    queryset = ServicioOp.objects.filter()
    serializer_class = ServicioOpSerializer
    # permission_classes = [permissions.IsAuthenticated]
